package com.cbtx.tablet;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.cbtx.tablet.ui.SplashActivity;

/**
 * author : joker.peng
 * e-mail : joker@fiture.com
 * date   : 2021/10/13 12:46 下午
 * desc   :
 */
public class StartReceiver extends BroadcastReceiver {
    public StartReceiver() {
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        //此处及是重启的之后，打开我们app的方法
        if ("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {
            Intent intentStart = new Intent(context, SplashActivity.class);
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(intentStart);
        }
    }
}